package com.zky.domain.po;

import lombok.Data;

import java.util.List;

@Data
public class PageResult<T> {
    private List<T> records;  // 当前页数据
    private long total;       // 总条数

    public PageResult(List<T> records, long total) {
        this.records = records;
        this.total = total;
    }

    public static <T> Result<T> of(List<T> records, long total) {
        return Result.ok(new PageResult<>(records, total));
    }

    // getter & setter
}